import  pymongo

client = pymongo.MongoClient('mongodb://127.0.0.1:27018,127.0.0.1:27017,127.0.0.1:27019')

test = client['mongo']['test']

r = test.find_one()
print(r)
for i in r:
    print(i)
client.close()